'''def print_hello_world():
    print("Hello World")

print_hello_world()

def add_method(a, b):
    return a+b


print(add_method(1, 2))

help(add_method)


a = 100
print(a)
def testA():
    # 修改全局变量
    global a
    a = 200
    print(a)
testA()
print(a)



a = 0
def testA():
    global a
    a = 100

def testB():
    print(a)

testA()
testB()
'''

# 位置参数
"""def user_info(name, age, gender):
    print(f"您的名字是{name}, 年龄是{age}, 性别是{gender}")
user_info('小明', "男", 23)"""

# 关键字参数
'''def user_info(name, age, gender):
    print(f"您的名字是{name}, 年龄是{age}, 性别是{gender}")
user_info(name='小明', age=25, gender="女生")
user_info(gender="女生", age=25)'''

# 不定长参数
'''def user_info(*args):
    print(args)
user_info('tome')
user_info('tome', 23)'''

# 拆包
'''def return_num():
    return 100
a = return_num()
print(a)

dict1 = {"name":"tome", "age":9}
a,b = dict1
print(a)
print(b)
print(dict1[a])
print(dict1[b])'''

a = 1
b = a
print(b)
print(id(a))
print(id(b))
a = 2
print(b)
print(id(a))
print(id(b))
